<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li <if condition="$type eq 1">class="active"</if> ><a href="{:url('address/index',['type'=>1])}">驿站管理</a></li>
        <li <if condition="$type eq 2">class="active"</if> ><a href="{:url('address/index',['type'=>2])}">小站管理</a></li>
    </ul>
    <form class="margin-top-20">
        <div class="table-actions">
            <a class="btn btn-info btn-sm" href="{:url('address/add')}">添加地址</a>
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th width="80">编号</th>
                <th>地址</th>
                <th width="80">{:lang('STATUS')}</th>
                <th width="160">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="res" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>{$arrStatus[$vo['status']]}</td>
                    <td>
                        <a href="{:url('address/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <if condition="$vo['status'] eq 1">
                            <a class="js-ajax-dialog-btn"
                               href="{:url('address/upStatus',['id'=>$vo['id'],'status'=>0])}">禁用</a>
                            <else/>
                            <a class="js-ajax-dialog-btn"
                               href="{:url('address/upStatus',['id'=>$vo['id'] ,'status'=>1])}">启用</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>